package com.junjie.checkin.response;

import lombok.Getter;

/**
 * @author 洪浚杰
 * @description
 * @date 2025/6/9 13:34
 */
@Getter
public enum ResultStatus {
    OK(0,"success"),
    UPLOAD_FAILED(110,"上传失败"),
    BAD_REQUEST(100,"错误参数"),
    USER_EXISTED(101,"用户已存在"),
    ROLE_ERROR(102,"用户角色不允许操作该接口"),
    DELETE_OWN_ERROR(103,"不能删除自己"),
    OPERATIONS_BEYOND_PERMISSION(104,"权限错误,操作被拒绝"),
    POINT_DEDUCTION_ERROR(105,"积分扣除失败,扣除积分超过用户当前积分"),
    AUTHENTICATION_FAILED(201,"认证失败"),
    ACCESS_DENIED(202,"服务拒绝"),
    TOKEN_MISSING(250,"令牌缺失"),
    TOKEN_INVALID(251,"令牌已失效"),
    TOKEN_VERIFY_ERROR(252,"令牌校验错误，请检查你的令牌"),
    TOKEN_EXPIRED(253,"令牌已过期"),
    SIGN_UP_ERROR(260,"错误的报名时段"),
    SIGN_UP_COUNT_MAX(261,"该活动报名人数已满"),
    USER_ALREADY_SIGN_UP(262,"用户已报名过该活动"),
    USER_NOT_SIGN_UP(263,"用户未报名该活动,不允许签到"),
    CHECK_IN_ERROR(264,"签到错误，当前时间不再有效的签到时间段"),
    USER_ALREADY_CHECK_IN(265,"用户已签到过该活动"),
    HISTORY_CANCELLED(266,"用户已取消参与活动，签到失败"),
    INSUFFICIENT_POINTS(270,"兑换失败,用户积分不足"),
    GIFT_UNDER_STOCK(271,"兑换失败,礼品库存不足"),
    GIFT_ALREADY_REMOVE(272,"礼品已下架,不允许修改"),
    RESOURCE_NOT_FOUND(300,"资源不存在"),
    SERVER_ERROR(500,"服务器错误");
    private final Integer code;
    private final String msg;
    private ResultStatus(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
